VERSION 5.00
Begin VB.Form busqueda 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "BUSQUEDA"
   ClientHeight    =   1740
   ClientLeft      =   36
   ClientTop       =   360
   ClientWidth     =   6792
   BeginProperty Font 
      Name            =   "Verdana"
      Size            =   9
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1740
   ScaleWidth      =   6792
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  'Windows Default
   Begin VB.ComboBox cmb_ensayo 
      Height          =   312
      ItemData        =   "busqueda.frx":0000
      Left            =   1560
      List            =   "busqueda.frx":000A
      TabIndex        =   7
      Top             =   360
      Width           =   2532
   End
   Begin VB.OptionButton opt_param 
      Caption         =   "Parametro"
      Height          =   216
      Left            =   120
      TabIndex        =   6
      Top             =   840
      Width           =   1332
   End
   Begin VB.ComboBox cmb_datos 
      Height          =   312
      Left            =   4080
      TabIndex        =   5
      Top             =   1320
      Width           =   2652
   End
   Begin VB.ComboBox cmb_buscar 
      Height          =   312
      Left            =   1560
      TabIndex        =   4
      Top             =   1320
      Width           =   2532
   End
   Begin VB.TextBox txt_param 
      Height          =   444
      Left            =   1560
      TabIndex        =   3
      Top             =   720
      Width           =   5172
   End
   Begin VB.OptionButton opt_buscar 
      Caption         =   "Buscar por:"
      Height          =   252
      Left            =   120
      TabIndex        =   2
      Top             =   1320
      Width           =   1452
   End
   Begin VB.CommandButton cmd_buscar 
      Caption         =   "Buscar"
      Height          =   252
      Left            =   120
      TabIndex        =   1
      Top             =   0
      Width           =   1212
   End
   Begin VB.OptionButton opt_ensa 
      Caption         =   "Ensayo"
      Height          =   216
      Left            =   120
      TabIndex        =   0
      Top             =   360
      Width           =   1332
   End
End
Attribute VB_Name = "busqueda"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Form_Load()
cmb_ensayo.ListIndex = 0
Call busquedaQuimi("busqueda")
End Sub
Private Sub Form_Unload(Cancel As Integer)
bandReporte = bandReporte: cadParametros = cadParametros: Unload Me
End Sub
Private Sub cmb_buscar_Click()
Call mostarDatos("busqueda", cmb_buscar): cmb_datos.ListIndex = 0

End Sub

Private Sub opt_buscar_Click()
If opt_buscar.Value = True Then
txt_param.Enabled = False
cmb_buscar.Enabled = True
cmb_datos.Enabled = True
cmb_ensayo.Enabled = False
End If
End Sub

Private Sub opt_ensa_Click()
If opt_ensa.Value = True Then
txt_param.Enabled = False
cmb_buscar.Enabled = False
cmb_datos.Enabled = False
cmb_ensayo.Enabled = True
End If
End Sub
Private Sub opt_param_Click()
If opt_param.Value = True Then
txt_param.Enabled = True
cmb_buscar.Enabled = False
cmb_datos.Enabled = False
cmb_ensayo.Enabled = False
End If
End Sub
Private Sub cmd_buscar_Click()
Dim aux As String
'mostrar la lista nueva
'Buscar por ensayos
If opt_ensa.Value = True Then
 If cmb_ensayo.ListIndex = 0 Then bandReporte = 1: cadParametros = "":  Call Form_Unload(0)
 If cmb_ensayo.ListIndex = 1 Then bandReporte = 2: cadParametros = "":  Call Form_Unload(0)
'Buscar por parametro
ElseIf opt_param.Value = True And txt_param.Text <> "" Then
cadParametros = txt_param.Text: bandReporte = 4:  Call Form_Unload(0)
'Buscar por atributos tabla
ElseIf opt_buscar.Value = True And cmb_buscar <> "" Then
Select Case cmb_buscar
Case Is = "COSTO $": aux = "subtotal_us"
Case Is = "COSTO bs": aux = "subtotal_bs"
Case Is = "VALORES GUIA OMS": aux = "valores_guia_OMS"
Case Is = "TECNICA": aux = "metodo"
Case Is = "METODO NORMALIZADO APHA": aux = "apha"
Case Is = cmb_buscar: aux = cmb_buscar
End Select

bandReporte = 5: cadParametros = aux & "/" & cmb_datos:  Call Form_Unload(0) 'cmb_buscar
'Todos
Else
bandReporte = 3: cadParametros = "": Call Form_Unload(0)
End If


End Sub
